package design.simdi.code.final_paper.utils;

import java.util.List;

import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;

import design.simdi.code.final_paper.core.enums.TipContEnum;

/**
 * 
 * @author Marius Dumitriu - (May 30, 2010 - 11:32:11 PM)
 * 
 */
public class TipContComboBox extends DropDownChoice<TipContEnum> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7065146642542582118L;

	public TipContComboBox(String id, List<? extends TipContEnum> choices) {
		super(id, choices);
		this.setChoiceRenderer(new ChoiceRenderer<TipContEnum>() {
			/**
			 * 
			 */
			private static final long serialVersionUID = 7663952656509655945L;

			public Object getDisplayValue(TipContEnum object) {
				return getName(object.toString());

			}
		});
	}

	private String getName(String id) {
		return getString(id);

	}
}
